Loop Until frmMorph!lstFiles.List(frmMorph!lstFiles.ListIndex) <> gsDELETED
' if at end of list then
' go back to top
Else
If frmMorph!lstFiles.ListCount > 0 Then
frmMorph!lstFiles.ListIndex = 0
Else
frmMorph!lstFiles.ListIndex = -1
End If
End If
End If
' tell user already deleted
Else
MsgBox "File already deleted.", MB_ICONSTOP
End If
End If
End Sub
Sub zzDeleteIcons ()
' Description:
' Delete All icons
' Variables:
Dim bDelFlag As Integer ' save warning flag
Dim nX As Integer ' loop counter
' change to path
ChDrive frmMorph!drvList.Drive
ChDir frmMorph!filList.Path
' ask user if they are sure
If MsgBox("Are you sure you wish to delete all listed files?", MB_ICONQUESTION Or MB_YESNO Or MB_DEFBUTTON2) = IDYES Then
' ask user if they are sure
If MsgBox("Once again, are you absolutely sure you wish to delete all listed files?", MB_ICONQUESTION Or MB_YESNO Or MB_DEFBUTTON2) = IDYES Then
' setup warning option
bDelFlag = frmMorph!mnuOpDeleteWarn.Checked
If frmMorph!mnuOpDeleteWarn.Checked Then
frmMorph!mnuOpDeleteWarn.Checked = MsgBox("Do you wish to display a warning message before deleting each file?", MB_ICONQUESTION Or MB_YESNO Or MB_DEFBUTTON2) = IDYES
End If
' please wait...
Screen.MousePointer = HOURGLASS
' make sure above all other forms
zzFormFloat frmMorph
' if each icon in list
For nX = 0 To frmMorph!lstFiles.ListCount - 1
' if valid icon then
If zzFileType(frmMorph!lstFiles.List(nX), True) <> gnTYPE_BAD Then
' set list index
frmMorph!lstFiles.ListIndex = nX
' delete icon
Call zzDeleteIcon
End If
Next nX
' sink back
If Not frmMorph!mnuOpFloat.Checked Then
zzFormUnfloat frmMorph
End If
' ...done
Screen.MousePointer = DEFAULT
' set to first icon
If frmMorph!lstFiles.ListCount > 0 Then
frmMorph!lstFiles.ListIndex = -1
frmMorph!lstFiles.ListIndex = 0
End If
' reset warning flag
frmMorph!mnuOpDeleteWarn.Checked = bDelFlag
' refresh all icons
Call zzRefreshIcons
End If
End If
End Sub
Sub zzDisplayIcons ()
' Description:
' Display icons
' Variables:
Dim nCurCol As Integer
Dim nCurRow As Integer
Dim nPixelWidth As Integer
Dim nIcon As Integer
Dim nR As Integer
' clear viewing area
frmViewer!picIcons.Cls
' Determine what icon should be the first icon displayed (Upper left hand
' corner of viewing window) based on the current value of the Scrollbar.